<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="java.text.SimpleDateFormat"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
  <head>
    <base href="<%=basePath%>"/>
    <title>仓库信息添加</title>
	<meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
	<meta http-equiv="description" content="This is my page"/>
	<script type="text/javascript" src="<%=basePath%>dwr/engine.js"></script>
	<script type="text/javascript" src="<%=basePath%>dwr/util.js"></script>
	<script type="text/javascript" src="<%=basePath%>homepage/js/common.js"></script>
	<script type="text/javascript" src="<%= basePath %>dwr/interface/StorageInfoService.js"></script>
	<link rel="stylesheet" type="text/css" media="all" href="<%= basePath %>sources/css/pop-up.css" />
	<link rel="stylesheet" type="text/css" media="all" href="<%= basePath %>sources/css/general.css" />
	<link rel="stylesheet" type="text/css" media="all" href="<%= basePath %>sources/css/reset.css" />
	<link rel="stylesheet" type="text/css" media="all" href="<%= basePath %>sources/css/table.css" />
	<link rel="stylesheet" type="text/css" media="all" href="<%= basePath %>sources/css/view.css" />
	
	
	
	<script language="javascript" type="text/javascript" src="<%= basePath %>sources/js/WdatePicker.js"></script>
	<script type="text/javascript" charset="utf-8" src="<%= basePath %>sources/js/jquery.js"></script>
	<script type="text/javascript" charset="utf-8" src="<%=basePath%>sources/js/jquery.dataTables.js"></script>
	<script type="text/javascript" charset="utf-8" src="<%=basePath%>sources/js/ColReorder.js"></script>
	<script type="text/javascript" charset="utf-8" src="<%=basePath%>sources/js/ColVis.js"></script>
	<script type="text/javascript" src="<%= basePath %>sources/js/jquery.min.js"></script>
	<script type="text/javascript" src="<%= basePath %>sources/js/flexigrid.js"></script>
	<script type="text/javascript" src="<%= basePath %>sources/js/altMenu.js"></script>
	<script src="<%= basePath %>sources/js/jquery-ui.js"></script>
	<script src="<%= basePath %>sources/js/contextmenu.js" type="text/javascript"></script>
	
	
	
    <script type="text/javascript">
    	
    	    	
    	function addInfo(){
    		var name = document.getElementById("name").value;
    		var remark = document.getElementById("remark").value;
    		StorageInfoService.addInfo(name,remark,showResult);
    	}
    	
    	function showResult(data){
    		if(!data){
    			alert("添加成功");
    			document.getElementById("name").value = "";
    			document.getElementById("remark").value = "";
    		}else{
    			alert("添加失败");
    		}
    	}
    	
    	function clearAdd(){
    		document.getElementById("name").value = "";
    		document.getElementById("remark").value = "";
    	}
	</script>
	</head>
	<body style="overflow-y:scroll;">
        <h2 class="title">仓库信息添加</h2>
		<div class="clear"></div>
		 <hr class="dashed" />
		 <div class="clear"></div>
        <table width="100%" border="0" class="round-table">
            <tr>
                <td class="l-t"></td>
                <td class="m-t"></td>
                <td class="r-t"></td>
            </tr>
            <tr>
                <td class="l-m"></td>
                <td>
                	<table class="input-table">
					  <tr>
					    <td width="30%" class="right"><font color="red">*</font>&nbsp;&nbsp;仓库名称：</td>
                        <td width="70%"><div class="input-bg" style="float:left"><input name="name" type="text" id="name"  maxlength="100"/></div></td>                  
					  </tr> 
                      <tr>
						<td class="right">备注：</td>
						<td><textarea name="remark" cols="50" rows="4" id="remark"></textarea>
						<font color="red">&nbsp;(长度最大为2000)</font>
						</td>
                      </tr>
                      <tr>
                            <td colspan="2" class="center">
                                <a class="table-btn" onclick="addInfo()" id="add">添加
                                <a class="table-btn" onclick="clearAdd()">重置</a>
                                <span style="float:right;position:relative; margin:5px 0 0 18px; color:#F00;"><span style="position:relative; top:3px;"></span>注：*&nbsp;是必填项</span>
                            </td>
                        </tr>
                    </table>
                </td>
                <td class="r-m"></td>
            </tr>
            <tr>
                <td class="l-b"></td>
                <td class="m-b"></td>
                <td class="r-b"></td>
            </tr>
        </table>
  </body>
</html>
